<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="java.text.DateFormat"%>
<%@page import="com.ereport.entity.DailyActivity"%>
<%@page import="java.util.List"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link href="<%=application.getContextPath() %>/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>	
<script language="javascript" src="<%=application.getContextPath() %>/js/calendar_eu.js"></script>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath() %>/css/jquery-ui-1.8.17.custom.css"/>
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/datatable.css"/>
<script type="text/javascript" language="javascript" src="<%=application.getContextPath()%>/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/colResizable-1.3.min.js"></script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#dayTable').dataTable({
			//"sDom": 'R<"H"lfr>t<"F"ip<',
			
			"bScrollCollapse": true,
			"bAutoWidth": true,
			"bJQueryUI": true,
			"sPaginationType": "full_numbers",
			"bSortClasses": false,
			"aaSorting": [] 
			
		});
	} );
</script>
<script type="text/javascript">
$(function(){
	  $("#dayTable").colResizable();
	});
</script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#wkTable').dataTable({
			//"sDom": 'R<"H"lfr>t<"F"ip<',
			
			"bScrollCollapse": true,
			"bAutoWidth": true,
			"bJQueryUI": true,
			"sPaginationType": "full_numbers",
			"bSortClasses": false,
			"aaSorting": [] 
			
		});
	} );
</script>
<script type="text/javascript">
$(function(){
	  $("#wkTable").colResizable();
	});
</script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#mnTable').dataTable({
			//"sDom": 'R<"H"lfr>t<"F"ip<',
			
			"bScrollCollapse": true,
			"bAutoWidth": true,
			"bJQueryUI": true,
			"sPaginationType": "full_numbers",
			"bSortClasses": false,
			"aaSorting": [] 
			
		});
	} );
</script>
<script type="text/javascript">
$(function(){
	  $("#mnTable").colResizable();
	});
</script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#wkTable').dataTable();
	} );
</script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#mnTable').dataTable();
	} );
</script>
<style>
<!--
.ui-widget-header {
    background: url("") repeat-x scroll 50% 50% #4783a2;
    border: 1px solid #4783a2;
    color: #FFFFFF;
    font-weight: bold;
}
.dataTables_filter{
height: 25px;
width:210px;
}
.ui-buttonset .ui-button {
    margin-left: 0;
    margin-right: 0.001em;
}
.ui-corner-tl {
    
    font-size: 13px;
    
}
.paging_full_numbers {
    height: 22px;
    line-height: 18px;
    width: 300px;
}
.dataTables_filter input{
width:148px;
 height:20px;
  background:#e8e8e8;
   border-radius: 4px;
     border:1px solid #a1a1a1;
}
-->
</style>
<script type="text/javascript">
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<script type="text/javascript">
function gettotal(d){
	var id=d.id;
	var temp=id.split("_");
	var cnt=temp[1];
	var te=0;
	var cp=0;
	var fe=0;
	if($("#te_"+cnt).val()!=""){
		te=parseFloat($("#te_"+cnt).val());
	}
	if($("#cp_"+cnt).val()!=""){
		cp=parseFloat($("#cp_"+cnt).val());
	}
	if($("#fe_"+cnt).val()!=""){
		fe=parseFloat($("#fe_"+cnt).val());
	}
	var total=te+cp+fe;
	total=total.toFixed(2);
	$("#total_"+cnt).val(total);
	var rCount=$("#rCount").val();
	var grdtot=0;
	for(var i=1;i<=parseFloat(rCount);i++){
		if($("#total_"+i).val()!=null){
			if($("#total_"+i).val()!=""){
				grdtot+=parseFloat($("#total_"+i).val());
			}
		}
	}
	$("#grdtotal").val(grdtot);
}
</script>
<script type="text/javascript">
function getBudgetPlan(){
	var mnth=$("#mnth").val();
	var year=$("#year").val();
	var data="month="+mnth+"&year="+year;
	
	$.ajax({
		url:"<%=application.getContextPath() %>/budgetPlanner/getbudget.do",
		mimetype: "text/html",
		method: "post",
		cache: false,
		data: data,
		success: function(res){
			$("#bdTable").hide();
			$("#budgetTable").html(res);
		}
		
	});
	
}
</script>
<script type="text/javascript">
function expExcelMn(){
	var mnth=$("#mnth").val();
	var year=$("#yr").val();
	
	window.location = "<%=application.getContextPath()%>/DailyCallReport/getMnExcel.do?month="+mnth+"&year="+year;

}
</script>
<script type="text/javascript">
function expExcelWk(){
	var frmdate=$("#week1Date").val();
	var todate=$("#week2Date").val();
	
	window.location = "<%=application.getContextPath()%>/DailyCallReport/getWkExcel.do?week1Date="+frmdate+"&week2Date="+todate;

}
</script>
<script type="text/javascript">
function expExcelDay(){
	var daydate=$("#dailyDate").val();
	
	window.location = "<%=application.getContextPath()%>/DailyCallReport/getDayExcel.do?dailyDate="+daydate;

}
</script>
<script type="text/javascript">

function showDaily(){
	$("#day").show("slow");
	$("#week").hide("slow");
	$("#month").hide("slow");
	$("#dailyActivity2").show("slow");
	$("#weekActivity").hide("slow");
	$("#mnthActivity").hide("slow");
	
}


function showweek(){
	$("#day").hide("slow");
	$("#week").show("slow");
	$("#month").hide("slow");
	$("#dailyActivity2").hide("slow");
	$("#weekActivity").show("slow");
	$("#mnthActivity").hide("slow");
	
}

function showmnth(){
	$("#day").hide("slow");
	$("#week").hide("slow");
	$("#month").show("slow");
	$("#dailyActivity2").hide("slow");
	$("#weekActivity").hide("slow");
	$("#mnthActivity").show("slow");
}

$(document).ready(function(){
	<%
	if(request.getParameter("edate")!=null){
	%>
	showDaily();
	<%
	}
	%>
	
});

$(document).ready(function(){
	<%
	if(request.getParameter("fdate")!=null && request.getParameter("tdate")!=null){
	%>
	showweek();
	<%
	}
	%>
	
});

$(document).ready(function(){
	<%
	if(request.getParameter("mdate")!=null){
	%>
	showmnth();
	<%
	}
	%>
	
});
</script>
</head>
<style>
	#editor{
	width:95%;
	}
	#remarksEditor{
	width:95%;
	}
	#nextsteppopup {
	position:absolute;
  z-index:200; /* aaaalways on top*/
  padding: 3px;
 
  width: 250px;
  color: white;
	}
	.ui-dialog .ui-state-error { padding: .3em; }
	.ui-corner-all{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #ffffff;
	text-decoration: none;
	}
	.ui-corner-all:hover{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #ffffff;
	text-decoration: none;
	}
	.logout{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	height: 15px;
	width: 50px;
	font-weight: normal;
	color: red;
	text-decoration: none;
	}
	#bulletinDialog title{
	font-family:Arial, Helvetica, sans-serif;
	font-size:14px;
	font-weight:bold;
	
	}
	.tdinput{
	text-align: center;
	}
	.button-black{
		padding-bottom: 20px;
	}
	.button-black:hover{
		padding-bottom: 20px;
	}
	
	</style>


<script type="text/javascript">
$(document).ready(function(){
$('.popup').live('click',function(){
var id=this.id;
var $dialog = $('#bulletinDialog'+id).dialog({
                autoOpen: false,
                modal: true,
                width: 285,
                height: 230,
			 });
 			var text=$("#editor"+id).val();
			$("."+id).val(text);
			$dialog.dialog('open');
});
});
</script>
<script  type="text/javascript">
$(document).ready(function(){
$('.popup3').live('click',function(){
var id=this.id;
var $dialog = $('#contdetDailog'+id).dialog({
                autoOpen: false,
                modal: true,
                width: 250,
                height: 330,
            });
			var text=$("#mbl"+id).val();
			$(".mbl"+id).val(text);
			var text=$("#email"+id).val();
			$(".email"+id).val(text);
			var text=$("#fax"+id).val();
			$(".fax"+id).val(text);
			var text=$("#landph"+id).val();
			$(".landph"+id).val(text);
			
            $dialog.dialog('open');
});
});

		
    </script>

    <script>

	$(function() {
		$( "#dailyDate" ).datepicker({ dateFormat: "dd-mm-yy" });
	});
	</script>
    <script>

	$(function() {
		$( "#week1Date" ).datepicker({ dateFormat: "dd-mm-yy" });
	});
	</script>
    <script>

	$(function() {
		$( "#week2Date" ).datepicker({ dateFormat: "dd-mm-yy" });
	});
	</script>
<body onload="MM_preloadImages('<%=application.getContextPath() %>/images/mb-hover.jpg','<%=application.getContextPath() %>/images/bp-hover.jpg','<%=application.getContextPath() %>/images/sp-hover.jpg')">
<table width="927" style="height:880px" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="116" align="left" valign="top" background="<%=application.getContextPath() %>/images/top-bg.jpg" style="background-repeat:repeat-x; background-position:left top">
    <%@ include file="common/exe-header.jsp" %></td>
  </tr>
  <tr>
    <td align="left" valign="top" height="30px">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
    		<td align="left" valign="top">&nbsp;&nbsp;
    			<a href="<%=application.getContextPath() %>/user/open.do"><img src="<%=application.getContextPath() %>/images/home1.jpg" width="20" height="20" border="0" /></a>    		</td>
    	<td align="center" valign="top">
    	<%
        if(request.getParameter("success")!=null){
        	out.println(request.getParameter("success"));
        }
        %>    	</td>
    	<td width="8%" align="center"><a href="<%=application.getContextPath() %>/user/logout.do" style="font-family: sans-serif;">&nbsp;&nbsp;Logout</a></td>
    	</tr>
    </table>    </td>
  </tr>
  <tr>
    <td  align="left" height="150" valign="top"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="23%"  align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="5%">&nbsp;</td>
            <td width="95%"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','<%=application.getContextPath() %>/images/dailycall-hover.jpg',1)"><img src="<%=application.getContextPath() %>/images/dailycall-hover.jpg" name="Image2" width="190" height="58" border="0" id="Image2" /></a></td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            <td><a href="<%=application.getContextPath() %>/conveyExpdture/open.do" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','<%=application.getContextPath() %>/images/convExp-hover.jpg',1)"><img src="<%=application.getContextPath() %>/images/convExp-active.jpg" name="Image3" width="190" height="62" border="0" id="Image3" /></a></td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            <td><a href="<%=application.getContextPath() %>/businessReport/open.do" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','<%=application.getContextPath() %>/images/busReport-hover.jpg',1)"><img src="<%=application.getContextPath() %>/images/busReport-active.jpg" name="Image4" width="190" height="57" border="0" id="Image4" /></a></td>
            </tr>
        </table></td>
        <td width="76%" valign="top"><table width="100%" height="177" cellpadding="0" cellspacing="0" bordercolor="#F0F0F0" class="box-border1">
          <tr>
            <td width="99%" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
       <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td width="20">&nbsp;</td>
        <td align="center" valign="top" class="heading">Activity Report </td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        	<tr>
        		<td  width="8%" >
        			<input type="button" id="daybutton" name="day" value="Day" class="button-black" style="width: 37px; height: 25px; font-size: 11px; margin-left: 5px; " onclick="javascript: showDaily()"/>
        		</td>
        		<td  width="8%"> 
        			<input type="button" id="weekbutton" name="week" value="Week" class="button-black" style="width: 40px; height: 25px; font-size: 11px; margin-left: 5px; " onclick="javascript: showweek()"/>
        		</td>
        		<td width="84%">
        			<input type="button" id="monthbutton" name="month" value="Month" class="button-black" style="width: 43px; height: 25px; font-size: 11px; margin-left: 5px; " onclick="javascript: showmnth()"/>
        		</td>
        	</tr>
        </table> </td>
        <td>&nbsp;</td>
      </tr>
     <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td >&nbsp;</td>
        <td align="center">
        <div id="day">
        <form action="<%=application.getContextPath()%>/DailyCallReport/getActivity.do" method="post">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        	<tr>
        		<td class="hed-blc" width="18%" align="center">Daily Call Report</td>
        		<td align="left" width="12%"> 
        		<%
        		String edate="";
        		Date crdt=new Date();
        		SimpleDateFormat sdf=new SimpleDateFormat("dd-MM-yyyy");
        		edate=sdf.format(crdt);
        		if(request.getParameter("edate")!=null){
        			edate=request.getParameter("edate");
        		}
        		%>
        			<input name="dailyDate" id="dailyDate" class="textfield" style="width: 100px" type="text" value="<%=edate %>" />        		</td>
        		<td width="70%">
        		
        			<input type="submit" name="go" value="GO" class="button-black" style="width: 37px; height: 25px; font-size: 11px; margin-left: 5px; "/>
        		
        		</td>
        	</tr>
        </table>
        </form>
        </div>
        <div id="week" style="display: none;">
        <form action="<%=application.getContextPath()%>/DailyCallReport/getwkActivity.do" method="post">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        	<tr>
        		<td class="hed-blc" width="11%" align="center">From Date</td>
        		<td class="hed-blc" width="18%" align="center"><%
        		String fdate="";
        		if(request.getParameter("fdate")!=null){
        			fdate=request.getParameter("fdate");
        		}
        		%>
        			<input name="week1Date" id="week1Date" class="textfield" style="width: 100px" type="text" value="<%=fdate %>" />  
        		</td>
        		<td class="hed-blc" width="11%" align="center">To Date</td>
        		<td align="left" width="12%"> 
        		<%
        		String wdate="";
        		if(request.getParameter("tdate")!=null){
        			wdate=request.getParameter("tdate");
        		}
        		%>
        			<input name="week2Date" id="week2Date" class="textfield" style="width: 100px" type="text" value="<%=wdate %>" />        		</td>
        		<td width="70%">
        		
        			<input type="submit" name="go" value="GO" class="button-black" style="width: 37px; height: 25px; font-size: 11px; margin-left: 5px; "/>
        		
        		</td>
        	</tr>
        </table>
        </form>
        </div>
        <div id="month" style="display: none;" >
        <form action="<%=application.getContextPath()%>/DailyCallReport/getmnActivity.do" method="post">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        	<tr>
        		<td class="hed-blc" width="18%" align="center">Month Report</td>
        		<td align="left" width="12%"> 
        		<%
        		
        		Date mcrdt=new Date();
        		SimpleDateFormat msdf=new SimpleDateFormat("dd-MM-yyyy");
        		String medate=sdf.format(mcrdt);      		
        		      		String[] t=medate.split("-");
        					
        					String m=t[1].toString();      		
        					System.out.println("month "+m);
        					if(request.getParameter("mdate")!=null){
        						m=request.getParameter("mdate").toString();
        						
        					%>
        					<script>
        					$(document).ready(function(){
        					$("#mnth").val("<%=m%>");
        					});
        					</script>
        					<%
        					}
        					%>
        		<select name="month" class="textfield" id="mnth" style="width: 90px" >
        					
                          <option value="">Month</option>
                          <option value="01">Jan</option>
                          <option value="02">Feb</option>
                          <option value="03">Mar</option>
                          <option value="04">Apr</option>
                          <option value="05">May</option>
                          <option value="06">Jun</option>
                          <option value="07">Jul</option>
                          <option value="08">Aug</option>
                          <option value="09">Sep</option>
                          <option value="10">Oct</option>
                          <option value="11">Nov</option>
                          <option value="12">Dec</option>
                      </select> 
           		</td>
        		<td class="hed-blc" width="1%" align="center">&nbsp;</td>
        		<td align="left" width="12%"> 
        		<%
        		
        					String y=t[2];
        					if(request.getParameter("ydate")!=null){
        						y=request.getParameter("ydate").toString();
        					%>
        					<script>
        					$(document).ready(function(){
        					$("#yr").val("<%=y%>");
        					});
        					</script>
        					<%
        					}
        					%>
        		<select name="year" class="textfield" id="yr" style="width: 90px" >
        					
                          <option value="">Year</option>
                          <option value="2012">2012</option>
                          <option value="2013">2013</option>
                          <option value="2014">2014</option>
                          <option value="2015">2015</option>
                          <option value="2016">2016</option>
                          <option value="2017">2017</option>
                          <option value="2018">2018</option>
                          <option value="2019">2019</option>
                          <option value="2020">2020</option>
                          <option value="2021">2021</option>
                          <option value="2022">2022</option>
                          <option value="2023">2023</option>
                      </select> 
           		</td>
        		<td width="70%">
        		
        			<input type="submit" name="go" value="GO" class="button-black" style="width: 37px; height: 25px; font-size: 11px; margin-left: 5px; "/> 
        		
        		</td>
        		
        	</tr>
        </table>
        </form>
        </div>
        </td>
        <td>&nbsp;</td>
      </tr>
       <tr>
        <td>&nbsp;</td>
        <td align="center">       </td>
        <td>&nbsp;</td>
      </tr>
       <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
       
     
      
      
    </table></td>
          </tr>
        </table></td>
        <td width="3%" valign="top">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="left" height="10px" valign="top">&nbsp;
       </td>
  </tr>
  <tr>
    <td align="center"  valign="top">
    <%
        List<DailyActivity> dalist=(List<DailyActivity>)session.getAttribute("dalist");
        System.out.println("dalist in jsp "+dalist);
        if(dalist!=null){
        	if(dalist.size()!=0){
        		System.out.println("dalist size is "+dalist.size());
        %>
        <div id="dailyActivity2">
          <table width="98%" border="0" cellspacing="0" cellpadding="0" >
            <tr>
              <td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td>
                    <div id="demo" >
                    <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#327aa0" class="tablebox" id="dayTable">
                        <thead>
                        <tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                          <th width="23" height="30" align="center" valign="middle" class="hed" ><strong>Sr. No </strong></th>
                          <th width="144" align="center" valign="middle" class="hed" >Company</th>
                          <th width="91" align="center" valign="middle" class="hed">Division/Group</th>
                          <th width="56" align="center" valign="middle" class="hed"><strong>Contact Person </strong></th>
                          <th width="52" align="center" valign="middle" class="hed">Contact Details</th>
                          <th width="135" align="center" valign="middle" class="hed"><strong>Objective </strong></th>
                          <th width="110" align="center" valign="middle" class="hed">Cutomer Feed Back</th>
                          <th width="67" align="center" valign="middle" class="hed"><strong>Action To Be Taken </strong></th>
                          <th width="68" align="center" valign="middle" class="hed"><strong>Date </strong></th>
                          <th width="48" align="center" valign="middle" class="hed"><strong>Kms</strong></th>
                          <th width="36" align="center" valign="middle" class="hed">&nbsp;</th> 
                      </tr>
                      </thead>
                      <tbody>
                        <%
                        int c=0;
                        int kmsTotal=0;
                  for(int i=0;i<dalist.size();i++){
                  %>
                        <tr>
                          <td align="center" bgcolor="#d5e9f3"><%=i+1%></td>
                          <td bgcolor="#d5e9f3" title="<%=dalist.get(i).getOrganisation()%>" align="center">
                          <a href="<%=application.getContextPath() %>/accounts/getAcc.do?orgn=<%=dalist.get(i).getOrganisation()%>" target="_blank" >
                          	<span style="color: #0b395c;"><%=dalist.get(i).getOrganisation()%></span>
                          </a>
                          </td>
                          <td bgcolor="#d5e9f3" title="<%=dalist.get(i).getDivision()%>" align="center">
                          <%= dalist.get(i).getDivision()%>
                          </td>
                          <td bgcolor="#d5e9f3" title="<%=dalist.get(i).getContPerson()%>" align="center">
                          <%= dalist.get(i).getContPerson()%>
                          </td>
                          <td  align="center" bgcolor="#d5e9f3"><img src="<%=application.getContextPath() %>/images/arrow-li-4.gif" width="26" height="22" border="0" align="absmiddle" id="contpop<%=i+1 %>" class="popup3"/>
                              <div id="contdetDailogcontpop<%=i+1 %>" style="display: none;" title="Contact Details"> <br />
                                  <label class="content">Mobile</label>
                                <br />
                                  <input type="text" name="mobile" class="textfield" style="width: 220px" id="mobilecontpop<%=i+1 %>" value="<%= dalist.get(i).getContPerMbl()%>" title="<%=dalist.get(i).getContPerMbl()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Email</label>
                                <br />
                                  <input type="text" name="email" class="textfield" style="width: 220px" id="emailcontpop<%=i+1 %>" value="<%= dalist.get(i).getContPerEmail()%>" title="<%=dalist.get(i).getContPerEmail()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Fax</label>
                                <br />
                                  <input type="text" name="fax" class="textfield" style="width: 220px" id="faxcontpop<%=i+1 %>" value="<%= dalist.get(i).getContPerFax()%>" title="<%=dalist.get(i).getContPerFax()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Land Phone</label>
                                <br />
                                  <input type="text" name="landph" class="textfield" style="width: 220px" id="landphcontpop<%=i+1 %>" value="<%= dalist.get(i).getContPerLand()%>" title="<%=dalist.get(i).getContPerLand()%>" readonly="readonly"/>
                                  <br />
                            </div></td>
                          <td  bgcolor="#d5e9f3" title="<%=dalist.get(i).getVistObj()%>" align="center">
                            <%=dalist.get(i).getVistObj()%>
                          </td>
                          <td  bgcolor="#d5e9f3" title="<%= dalist.get(i).getVistOc()%>" align="center">
                            <%= dalist.get(i).getVistOc()%>
                          </td>
            <td align="center" bgcolor="#d5e9f3"><img src="<%=application.getContextPath() %>/images/arrow-li-4.gif" width="26" height="22" border="0" align="absmiddle" id="pop<%=i+1 %>" class="popup"/>
                              <div id="bulletinDialogpop<%=i+1 %>" style="display: none;" title="Nextstep">
                                <textarea id="editorpop<%=i+1 %>"  name="Message" rows="10" style="width: 250px;" ><%= dalist.get(i).getNextstep()%></textarea>
                            </div></td>
                            <%
                          String ddate="";
                         Date dat=dalist.get(i).getEdate();
                          DateFormat dfmt=new SimpleDateFormat("dd-MM-yyyy");
                          	ddate=dfmt.format(dat.getTime());
                          %>
                          <td  bgcolor="#d5e9f3" title="<%=ddate%>" align="center">
                   			<%= ddate%>
                          </td>
                          <td  bgcolor="#d5e9f3" title="<%=dalist.get(i).getKms()%>" align="center">
                   				<%= dalist.get(i).getKms()%>
                          </td>
                          <td align="center" bgcolor="#d5e9f3">
                    	<a href="javascript:void()" onclick="javascript:window.open('<%=application.getContextPath() %>/opportunity/enqReport.do?dactid=<%=dalist.get(i).getId()%>&edate=<%=dalist.get(i).getEdate()%>')">
					<img src="<%=application.getContextPath() %>/images/enquiry-2.jpg" align="middle" id="enq1" border="0"/> </a></td>  
                        </tr>
                 
                        <%
                        c=i;
                        int k=dalist.get(i).getKms();
                        kmsTotal=kmsTotal+k;
                  }
				%>
				</tbody>
                    </table>
                    </div>
                    </td>
                  </tr>
                 
              </table></td>
            </tr>
            <tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>
             <tr>
           			<td align="left" >
						<table width="98%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" width="120" class="hed-blc">No.of Customers:</td>
								<td align="left"><%=c+1%> </td>
								<td align="right">
								
								<input type="button" class="button-black-right" value="Export to Excel" onclick="expExcelDay()"/>
								
								 </td>
							</tr>
							 <tr>
           						<td align="left" class="hed-blc">Total Kms:</td>
           						<td align="left"><%=kmsTotal %> </td>
           						<td align="left">&nbsp; </td>
           		  			</tr>
						</table>
					</td>
           			
           	</tr>
           	<tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>	  
                  
          </table>
        </div>
      <%
        
        }else {
        %>
         <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="center" valign="top">
        <p class="box-border1 hed-blc" style="font-size: 13px" > No Records Found</p>
        </td>
        </tr>
        </table>
      <%
        }
        	session.setAttribute("dalist",null);
        }
		%>
    <%
        List<DailyActivity> wklist=(List<DailyActivity>)session.getAttribute("wklist");
        System.out.println("dalist in jsp "+wklist);
        if(wklist!=null){
        	if(wklist.size()!=0){
        		//System.out.println("wklist size is "+wklist.size());
        %>
        <div id="weekActivity">
          <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td>
                    <div id="demo2">
                    <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#327aa0" class="tablebox" id="wkTable">
                        <thead>
                        <tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                          <td width="23" height="30" align="center" valign="middle" class="hed"><strong>Sr. No </strong></td>
                          <td width="144" align="center" valign="middle" class="hed">Company</td>
                          <td width="91" align="center" valign="middle" class="hed">Division/Group</td>
                          <td width="56" align="center" valign="middle" class="hed"><strong>Contact Person </strong></td>
                          <td width="52" align="center" valign="middle" class="hed">Contact Details</td>
                          <td width="135" align="center" valign="middle" class="hed"><strong>Objective </strong></td>
                          <td width="110" align="center" valign="middle" class="hed">Cutomer Feed Back</td>
                          <td width="67" align="center" valign="middle" class="hed"><strong>Action To Be Taken </strong></td>
                          <td width="68" align="center" valign="middle" class="hed"><strong>Date </strong></td>
                          <td width="48" align="center" valign="middle" class="hed"><strong>Kms</strong></td>
                          <td width="36" align="center" valign="middle" class="hed">&nbsp;</td>
                      </tr>
                      </thead>
                      <tbody>
                        <%
                        int c2=0;
                        int kmsTotal2=0;
                  for(int j=0;j<wklist.size();j++){
                  %>
                        <tr>
                          <td align="center" bgcolor="#d5e9f3"><%=j+1%></td>
                          <td bgcolor="#d5e9f3" title="<%=wklist.get(j).getOrganisation()%>" align="center">
                          <a href="<%=application.getContextPath() %>/accounts/getAcc.do?orgn=<%=wklist.get(j).getOrganisation()%>" target="_blank" >
                          	<span style="color: #0b395c;"><%=wklist.get(j).getOrganisation()%></span>
                          </a>
                          </td>
                          <td bgcolor="#d5e9f3" title="<%=wklist.get(j).getDivision()%>" align="center">
                          <%= wklist.get(j).getDivision()%>
                          </td>
                          <td bgcolor="#d5e9f3" title="<%=wklist.get(j).getContPerson()%>" align="center">
                          	<%= wklist.get(j).getContPerson()%>
                          </td>
                          <td  align="center" bgcolor="#d5e9f3"><img src="<%=application.getContextPath() %>/images/arrow-li-4.gif" width="26" height="22" border="0" align="absmiddle" id="contpop<%=j+1 %>" class="popup3"/>
                              <div id="contdetDailogcontpop<%=j+1 %>" style="display: none;" title="Contact Details"> <br />
                                  <label class="content">Mobile</label>
                                <br />
                                  <input type="text" name="mobile" class="textfield" style="width: 220px" id="mobilecontpop<%=j+1 %>" value="<%= wklist.get(j).getContPerMbl()%>" title="<%=wklist.get(j).getContPerMbl()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Email</label>
                                <br />
                                  <input type="text" name="email" class="textfield" style="width: 220px" id="emailcontpop<%=j+1 %>" value="<%= wklist.get(j).getContPerEmail()%>" title="<%=wklist.get(j).getContPerEmail()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Fax</label>
                                <br />
                                  <input type="text" name="fax" class="textfield" style="width: 220px" id="faxcontpop<%=j+1 %>" value="<%= wklist.get(j).getContPerFax()%>" title="<%=wklist.get(j).getContPerFax()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Land Phone</label>
                                <br />
                                  <input type="text" name="landph" class="textfield" style="width: 220px" id="landphcontpop<%=j+1 %>" value="<%= wklist.get(j).getContPerLand()%>" title="<%=wklist.get(j).getContPerLand()%>" readonly="readonly"/>
                                  <br />
                            </div></td>
                          <td  bgcolor="#d5e9f3" title="<%=wklist.get(j).getVistObj()%>" align="center">
                            <%=wklist.get(j).getVistObj()%>
                          </td>
                          <td  bgcolor="#d5e9f3" title="<%= wklist.get(j).getVistOc()%>" align="center">
                            <%= wklist.get(j).getVistOc()%>
                          </td>
                    <td align="center" bgcolor="#d5e9f3"><img src="<%=application.getContextPath() %>/images/arrow-li-4.gif" width="26" height="22" border="0" align="absmiddle" id="pop<%=j+1 %>" class="popup"/>
                              <div id="bulletinDialogpop<%=j+1 %>" style="display: none;" title="Nextstep">
                                <textarea id="editorpop<%=j+1 %>"  name="Message" rows="10" style="width: 250px;" ><%= wklist.get(j).getNextstep()%></textarea>
                            </div></td>
                                <%
                          String dwdate="";
                         Date dat=wklist.get(j).getEdate();
                          DateFormat dfmt=new SimpleDateFormat("dd-MM-yyyy");
                          	dwdate=dfmt.format(dat.getTime());
                          %>
                          <td  bgcolor="#d5e9f3" title="<%=dwdate%>" align="center">
                   				<%= dwdate%>
                          </td>
                          <td  bgcolor="#d5e9f3" title="<%=wklist.get(j).getKms()%>" align="center">
                   			<%= wklist.get(j).getKms()%>
                          </td>
                          <td align="center" bgcolor="#d5e9f3">
                    	<a href="javascript:void()" onclick="javascript:window.open('<%=application.getContextPath() %>/opportunity/enqReport.do?dactid=<%=wklist.get(j).getId()%>&edate=<%=wklist.get(j).getEdate()%>')">
					<img src="<%=application.getContextPath() %>/images/enquiry-2.jpg" align="middle" id="enq1" border="0"/> </a></td>  
                        </tr>
                 
                        <%
                        c2=j;
                        int k2=wklist.get(j).getKms();
                        kmsTotal2=kmsTotal2+k2;
                  }
				%>
				</tbody>
                    </table>
                    </div>
                    </td>
                  </tr>
                 
              </table></td>
            </tr>
            <tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>
             <tr>
           			<td align="left" >
						<table width="98%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" width="120" class="hed-blc">No.of Customers:</td>
								<td align="left"><%=c2+1%> </td>
								<td align="right">
								
								<input type="button" class="button-black-right" value="Export to Excel" onclick="expExcelWk()"/>
								
								 </td>
							</tr>
							 <tr>
           						<td align="left" class="hed-blc">Total Kms:</td>
           						<td align="left"><%=kmsTotal2 %> </td>
           						<td align="left">&nbsp; </td>
           		  			</tr>
						</table>
					</td>
           			
           	</tr>
           	<tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr> 
                  
          </table>
        </div>
      <%
        
        }else {
        %>
         <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="center" valign="top">
        <p class="box-border1 hed-blc" style="font-size: 13px" > No Records Found</p>
        </td>
        </tr>
        </table>
      <%
        }
        	session.setAttribute("wklist",null);
        }
		%>
    <%
        List<DailyActivity> mnlist=(List<DailyActivity>)session.getAttribute("mnlist");
        System.out.println("mnlist in jsp "+mnlist);
        if(mnlist!=null){
        	if(mnlist.size()!=0){
        		System.out.println("mnlist size is "+mnlist.size());
        %>
        <div id="mnthActivity">
          <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td>
                    <div id="demo3">
                    <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#327aa0" class="tablebox" id="mnTable">
                        <thead>
                        <tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                          <td width="23" height="30" align="center" valign="middle" class="hed"><strong>Sr. No </strong></td>
                          <td width="144" align="center" valign="middle" class="hed">Company</td>
                          <td width="91" align="center" valign="middle" class="hed">Division/Group</td>
                          <td width="56" align="center" valign="middle" class="hed"><strong>Contact Person </strong></td>
                          <td width="52" align="center" valign="middle" class="hed">Contact Details</td>
                          <td width="135" align="center" valign="middle" class="hed"><strong>Objective </strong></td>
                          <td width="110" align="center" valign="middle" class="hed">Cutomer Feed Back</td>
                          <td width="67" align="center" valign="middle" class="hed"><strong>Action To Be Taken </strong></td>
                          <td width="68" align="center" valign="middle" class="hed"><strong>Date </strong></td>
                          <td width="48" align="center" valign="middle" class="hed"><strong>Kms</strong></td>
                          <td width="36" align="center" valign="middle" class="hed">&nbsp;</td>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        int c3=0;
                        int kmsTotal3=0;
                  for(int n=0;n<mnlist.size();n++){
                  %>
                        <tr>
                          <td align="center" bgcolor="#d5e9f3"><%=n+1%></td>
                          <td bgcolor="#d5e9f3" title="<%=mnlist.get(n).getOrganisation()%>" align="center">
                          <a href="<%=application.getContextPath() %>/accounts/getAcc.do?orgn=<%=mnlist.get(n).getOrganisation()%>" target="_blank" >
                          <span style="color: #0b395c;"><%=mnlist.get(n).getOrganisation()%></span>
                          </a>
                          </td>
                          <td bgcolor="#d5e9f3" title="<%=mnlist.get(n).getDivision()%>" align="center">
                          <%= mnlist.get(n).getDivision()%>
                          </td>
                          <td bgcolor="#d5e9f3" title="<%=mnlist.get(n).getContPerson()%>" align="center">
                          <%= mnlist.get(n).getContPerson()%>
                          </td>
                          <td  align="center" bgcolor="#d5e9f3"><img src="<%=application.getContextPath() %>/images/arrow-li-4.gif" width="26" height="22" border="0" align="absmiddle" id="contpop<%=n+1 %>" class="popup3"/>
                              <div id="contdetDailogcontpop<%=n+1 %>" style="display: none;" title="Contact Details"> <br />
                                  <label class="content">Mobile</label>
                                <br />
                                  <input type="text" name="mobile" class="textfield" style="width: 220px" id="mobilecontpop<%=n+1 %>" value="<%= mnlist.get(n).getContPerMbl()%>" title="<%=mnlist.get(n).getContPerMbl()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Email</label>
                                <br />
                                  <input type="text" name="email" class="textfield" style="width: 220px" id="emailcontpop<%=n+1 %>" value="<%= mnlist.get(n).getContPerEmail()%>" title="<%=mnlist.get(n).getContPerEmail()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Fax</label>
                                <br />
                                  <input type="text" name="fax" class="textfield" style="width: 220px" id="faxcontpop<%=n+1 %>" value="<%= mnlist.get(n).getContPerFax()%>" title="<%=mnlist.get(n).getContPerFax()%>" readonly="readonly"/>
                                  <br />
                                <br />
                                <label class="content">Land Phone</label>
                                <br />
                                  <input type="text" name="landph" class="textfield" style="width: 220px" id="landphcontpop<%=n+1 %>" value="<%= mnlist.get(n).getContPerLand()%>" title="<%=mnlist.get(n).getContPerLand()%>" readonly="readonly"/>
                                  <br />
                            </div></td>
                          <td  bgcolor="#d5e9f3" title="<%=mnlist.get(n).getVistObj()%>" align="center">
                            <%=mnlist.get(n).getVistObj()%>
                          </td>
                          <td  bgcolor="#d5e9f3" title="<%= mnlist.get(n).getVistOc()%>" align="center">
                            <%= mnlist.get(n).getVistOc()%>
                          </td>
                          <td align="center" bgcolor="#d5e9f3"><img src="<%=application.getContextPath() %>/images/arrow-li-4.gif" width="26" height="22" border="0" align="absmiddle" id="pop<%=n+1 %>" class="popup"/>
                              <div id="bulletinDialogpop<%=n+1 %>" style="display: none; " title="Nextstep">
                                <textarea id="editorpop<%=n+1 %>"  name="Message" rows="10" style="width: 250px;" ><%= mnlist.get(n).getNextstep()%></textarea>
                            </div></td>
                            <%
                          String dmdate="";
                         Date dat=mnlist.get(n).getEdate();
                          DateFormat dfmt=new SimpleDateFormat("dd-MM-yyyy");
                          	dmdate=dfmt.format(dat.getTime());
                          %>
                          <td  bgcolor="#d5e9f3" title="<%=dmdate%>" align="center">
                   				<%=dmdate%>
                          </td>
                          <td  bgcolor="#d5e9f3" title="<%=mnlist.get(n).getKms()%>" align="center">
                   				<%= mnlist.get(n).getKms()%>
                          </td>
                          <td align="center" bgcolor="#d5e9f3">
                    	<a href="javascript:void()" onclick="javascript:window.open('<%=application.getContextPath() %>/opportunity/enqReport.do?dactid=<%=mnlist.get(n).getId()%>&edate=<%=mnlist.get(n).getEdate()%>')">
					<img src="<%=application.getContextPath() %>/images/enquiry-2.jpg" align="middle" id="enq1" border="0"/> </a></td>  
                        </tr>
                 
                        <%
                        c3=n;
                        int k3=mnlist.get(n).getKms();
                        kmsTotal3=kmsTotal3+k3;
                  }
				%>
				</tbody>
                    </table>
                    </div>
                    </td>
                  </tr>
                 
              </table></td>
            </tr>
            <tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>
             <tr>
           			<td align="left" >
						<table width="98%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" width="120" class="hed-blc">No.of Customers:</td>
								<td align="left"><%=c3+1%> </td>
								<td align="right">
								
								<input type="button" class="button-black-right" value="Export to Excel" onclick="expExcelMn()"/>
								
								 </td>
							</tr>
							 <tr>
           						<td align="left" class="hed-blc">Total Kms:</td>
           						<td align="left"><%=kmsTotal3 %> </td>
           						<td align="left">&nbsp; </td>
           		  			</tr>
						</table>
					</td>
           			
           	</tr>
           	<tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>  
                  
          </table>
        </div>
      <%
        
        }else {
        %>
         <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="center" valign="top">
        <p class="box-border1 hed-blc" style="font-size: 13px" > No Records Found</p>
        </td>
        </tr>
        </table>
      <%
        }
        	session.setAttribute("mnlist",null);
        }
		%>
    </td>
  </tr>
  <tr>
    <td height="40" align="left" valign="top" bgcolor="#0B0B0B">&nbsp;</td>
  </tr>
</table>

</body>
</html>
<script type="text/javascript">
$("#ok").click(function(){

var b= $("#editor").val();
//alert(b);
var cls=$('#editor').attr('class');
//alert(cls);

var text=$('#nst'+cls).val(b);
$('#bulletinDialog').dialog('close');

//alert(text.val());
});

</script>
<script type="text/javascript">
$("#save").click(function(){

var b= $("#remarksEditor").val();
//alert(b);
var cls=$('#remarksEditor').attr('class');
//alert(cls);

var text=$('#rem'+cls).val(b);
$('#remarksDialog').dialog('close');

//alert(text.val());
});

</script>


